/* =========================================================
   BASE GLOBALE POUR BLOG & GALERIE
========================================================= */
body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #ffffff;
    color: #000000;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 900px;
    margin: 20px auto;
    padding: 0 20px;
}

h1 {
    text-align: center;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 40px;
    color: #000000;
    margin-bottom: 20px;
}

h2 {
    text-align: center;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 30px;
    color: #000000;
    margin-bottom: 20px;
}

h3 {
    font-weight: bold;
    color: #000000;
}

p {
    line-height: 1.5;
    color: #000000;
}

/* =========================================================
   FORMULAIRES
========================================================= */
input[type="text"], input[type="password"], input[type="date"], textarea {
    width: 100%;
    max-width: 500px;
    padding: 8px 10px;
    margin-bottom: 10px;
    border: 1px solid #06a260;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
}

input::placeholder, textarea::placeholder {
    color: #999999;
    font-style: italic;
}

button {
    background-color: #06a260;
    color: #ffffff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
}

button:hover {
    background-color: #04914a;
}

/* =========================================================
   TABLEAUX, MESSAGES, LIENS
========================================================= */
p.success { color: green; font-weight: bold; }
p.error   { color: red; font-weight: bold; }

table {
    border-collapse: collapse;
    width: 100%;
    max-width: 900px;
    margin-top: 20px;
}

table th, table td {
    border: 1px solid #06a260;
    padding: 8px;
    text-align: left;
}

table th { background-color: #e6f5ed; }
table tr:nth-child(even) { background-color: #f9f9f9; }

table a {
    text-decoration: none;
    color: #06a260;
    font-weight: bold;
}

table a:hover { color: #04914a; }

a button { margin-bottom: 10px; }

/* =========================================================
   BOUTONS HAUT DE PAGE - PC
========================================================= */
.button-container {
    text-align: center;
    margin-bottom: 20px;
}

.button-container a {
    display: inline-block; /* côte à côte sur PC */
    margin: 0 5px;
    text-decoration: none; /* supprime souligné */
}

.button-container a button {
    display: inline-block;
    min-width: 120px;      /* largeur minimale */
    padding: 10px 20px;
    font-size: 16px;
}

.button-container a button:hover {
    background-color: #04914a;
}

/* =========================================================
   BANDEAU IMAGE FIXE + RIPPLE
========================================================= */
.banner {
    position: relative;
    width: 100%;
    height: 200px;
    background-image: url('/blog/assets/images/banner.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* image fixe sur PC */
    overflow: hidden;
}

/* Canvas créé par Ripples */
.banner canvas {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none;
}

/* =========================================================
   RESPONSIVE - MOBILE
========================================================= */
@media screen and (max-width: 600px) {
    input[type="text"], input[type="password"], input[type="date"], textarea {
        font-size: 16px;
        padding: 10px;
    }

    button {
        font-size: 16px;
        padding: 12px;
    }

    table { font-size: 14px; }

    .container { padding: 0 15px; }

    /* Empilement vertical des boutons sur mobile */
    .button-container a {
        display: block;
        width: 100%;
        margin: 5px 0;         /* espace vertical entre les boutons */
        text-decoration: none;
    }

    .button-container a button {
        width: 100%;
        display: block;
        margin: 0;              /* margin gérée sur le <a> */
        padding: 12px;
        font-size: 16px;
    }
}

/* =========================================================
   BOUTON RETOUR HAUT DE PAGE
========================================================= */

#backToTop {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    background-color: #06a260;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    display: none; /* caché par défaut */
    z-index: 9999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: opacity 0.3s ease;
}

#backToTop:hover {
    background-color: #04914a;
}

/* =========================================================
   PRELOADER
========================================================= */

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#preloader img {
    width: 32px;
    height: 32px;
}

/* =========================================================
   GALERIE PUBLIQUE - GRILLE ALBUMS
========================================================= */

.album-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.album-block {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.album-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.album-block img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.album-info {
    padding: 10px;
    text-align: center;
}

.album-info strong {
    display: block;
    font-size: 16px;
    margin-bottom: 5px;
}

.album-info span {
    font-size: 14px;
    color: #666666;
}

/* Responsive tablette */
@media screen and (max-width: 900px) {
    .album-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive mobile */
@media screen and (max-width: 600px) {
    .album-container {
        grid-template-columns: 1fr;
    }

    .album-block img {
        height: 220px;
    }
}

/* =========================================================
   GALERIE PUBLIQUE
========================================================= */

.album-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.album-block {
    background-color: #ffffff;
    border: 1px solid #06a260; /* même cadre que blog */
    padding: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.album-block:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.album-block a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.album-block img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    margin-bottom: 10px;
}

.album-info strong {
    display: block;
    font-size: 16px;
    margin-bottom: 5px;
    color: #333333;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.album-info span {
    font-size: 14px;
    color: #777777;
}

/* Pagination galerie */
.pagination {
    text-align: center;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    display: inline-block;
    margin: 0 5px;
    padding: 6px 10px;
    border: 1px solid #06a260;
    text-decoration: none;
    color: #06a260;
}

.pagination a:hover {
    background-color: #06a260;
    color: #ffffff;
}

.pagination .current {
    background-color: #06a260;
    color: #ffffff;
}

/* =========================================================
   PAGE ALBUM - PHOTOS
========================================================= */

.album-theme {
    text-align: center;
    font-weight: bold;
    font-size: 18px;
    margin-top: -10px;
}

.album-date {
    text-align: center;
    font-size: 16px;
    margin-bottom: 25px;
    color: #555555;
}

.photo-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.photo-block {
    border: 1px solid #06a260;
    padding: 5px;
}

.photo-block img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

/* =========================================================
   ALBUMS - BLOC PHOTOS D'UN ALBUM
========================================================= */
.album-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.album-block {
    width: 250px;
    border: 1px solid #06a260; /* même couleur que les cadres blog */
    border-radius: 8px;
    overflow: hidden;
    background-color: #ffffff;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.album-block img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.album-block a {
    text-decoration: none;
    color: inherit;
}

.album-block:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

/* =========================================================
   TITRE DES PHOTOS ET INFORMATIONS (optionnel)
========================================================= */
.album-block .photo-info {
    padding: 10px;
    font-size: 14px;
    color: #333333;
    text-transform: capitalize;
}

/* =========================================================
   RESPONSIVE - MOBILE
========================================================= */
@media screen and (max-width: 600px) {
    .album-block {
        width: 100%;
        max-width: 300px;
    }

    .album-block img {
        height: auto;
    }
}

/* =========================================================
   LIGHTBOX PHOTO PLEIN ÉCRAN
========================================================= */
#lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
}

#lightbox img {
    max-width: 95%;
    max-height: 95%;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    border-radius: 4px;
}

/* FOOTER */
footer {
    text-align: center;                                 /* Définition de la disposition du texte du footer */
    color: rgba(0, 0, 0);                               /* Définition de la couleur du texte du footer - Ici blanc */
    font-size: 0.80rem;                                 /* Définition de la taille de la police d'écriture du footer */
    padding: 35px 2px;                                  /* Définition de la taille du footer */
    background: #fff;;                                  /* Définition de la couleur de frise du footer - Ici bleu */
}

/* Cadre vert pour recettes et blocs */
.cadre-vert {
    border: 2px solid #06a260;
    border-radius: 8px;           /* Angles arrondis */
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;           /* Centre verticalement le contenu */
    justify-content: center;       /* Centre horizontalement le contenu si besoin */
    flex-direction: column;        /* Colonne pour image + titre */
    text-align: center;            /* Centrage texte */
}

/* Effet hover */
.bloc-clicable:hover .cadre-vert {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    cursor: pointer;
}

/* Titres à l'intérieur des blocs */
.bloc-vert h3 {
    margin: 10px 0 0 0;
    text-decoration: none;       /* Plus de soulignement */
}

/* Supprimer le soulignement des titres dans les blocs cliquables */
.bloc-clicable h3 {
    text-decoration: none;
}

/* Supprime le soulignement pour les liens des blocs clicables */
a.bloc-clicable {
    text-decoration: none;   /* plus de soulignement */
    color: inherit;          /* conserve la couleur du texte */
    display: block;   /* pour que le hover fonctionne correctement */
}

.recette-item:hover {
    transform: scale(1.02);
}

.recette-lien {
    width: 100%;
}