/* =========================
   COULEURS MODIFIABLES
========================= */

:root {
    --color-primary: #fa1e59;
    --color-secondary: #7b2ff7;
    --color-accent: #ff9800;

    --color-bg: #f5f6f8;
    --color-text: #222;
    --color-muted: #444;

    --color-white: #ffffff;
    --color-border: #e1e4e8;
    --color-soft-border: #ddd;

    --color-focus: #003cff;

    --shadow-soft: 0 6px 18px rgba(0,0,0,0.10);
    --shadow-hover: 0 10px 28px rgba(0,0,0,0.16);
}

/* =========================
   GLOBAL
========================= */

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--color-bg);
    margin: 0;
    color: var(--color-text);
    font-size: 16px;
}

.container {
    padding: 24px 30px;
}

img {
    max-width: 100%;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

/* =========================
   ACCESSIBILITE
========================= */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 9999;
    background: #ffffff;
    color: #000000;
    padding: 10px 14px;
    border-radius: 8px;
    border: 3px solid var(--color-focus);
    font-weight: bold;
    text-decoration: none;
}

.skip-link:focus {
    top: 12px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--color-focus);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}

/* =========================
   HEADER
========================= */

.header {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: var(--color-white);
    padding: 24px 30px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-left a {
    display: inline-flex;
    border-radius: 12px;
}

.logo {
    height: 95px;
    max-width: 190px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.25));
}

.header-center {
    text-align: center;
    flex: 1;
}

.header-center h1,
.header h1 {
    margin: 0;
    font-size: 30px;
    letter-spacing: 0.5px;
}

.header-center p,
.header p {
    margin: 6px 0 0 0;
    font-size: 14px;
    opacity: 0.95;
}

.btn-header {
    background: var(--color-white);
    color: var(--color-primary);
    padding: 10px 16px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 14px rgba(0,0,0,0.22);
    display: inline-block;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-header:hover {
    background: #ffe3ec;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.28);
}

/* =========================
   SEARCH
========================= */

.search-box {
    background: var(--color-white);
    border: 1px solid var(--color-soft-border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 18px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.search-box input {
    padding: 10px;
    width: 280px;
    max-width: 100%;
    border: 1px solid #777;
    border-radius: 8px;
    font-size: 15px;
}

/* =========================
   CATEGORIES
========================= */

.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 22px 0;
}

.cat-btn {
    padding: 9px 15px;
    background: #eeeeee;
    border-radius: 22px;
    text-decoration: none;
    color: #222;
    font-size: 14px;
    border: 1px solid #aaa;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.cat-btn:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-1px);
}

.cat-btn.active {
    color: var(--color-white);
    font-weight: bold;
}

/* =========================
   GRID
========================= */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    align-items: stretch;
}

/* =========================
   VIGNETTES
========================= */

.card {
    background: var(--color-white);
    border: 2px solid var(--color-border);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    position: relative;

    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-primary);
}

.card.nouveau-card {
    border-color: var(--color-primary);
    box-shadow: 0 8px 24px rgba(250,30,89,0.20);
}

.card.recent-card {
    border-color: var(--color-accent);
    box-shadow: 0 8px 22px rgba(255,152,0,0.18);
}

.card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background: #f7f7f7;
    border: 1px solid #d0d0d0;
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 8px;
    box-sizing: border-box;
}

.card h3 {
    margin: 8px 0;
    font-size: 19px;
    line-height: 1.25;
}

/* =========================
   ACTIONS DES VIGNETTES
========================= */

.card-actions {
    margin-top: auto;
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: stretch;
    width: 100%;
}

.card-actions .btn,
.card-actions .btn2,
.card-actions .btn-disabled {
    flex: 1;
    box-sizing: border-box;
    text-align: center;
    margin-top: 0;
    margin-right: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;
}

/* =========================
   BADGES
========================= */

.badge {
    display: inline-block;
    color: var(--color-white);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 8px;
    font-weight: bold;
}

.badge-corner-new,
.badge-corner-recent {
    position: absolute;
    top: 14px;
    right: 14px;
    color: var(--color-white);
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 2;
}

.badge-corner-new {
    background: var(--color-primary);
}

.badge-corner-recent {
    background: var(--color-accent);
}

/* =========================
   ETAT DISPONIBILITE
========================= */

.badge-etat {
    display: inline-block;
    margin: 8px 0;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
}

.badge-disponible {
    background: #e8f7ee;
    color: #145c25;
    border: 1px solid #8bc89c;
}

.badge-indispo {
    background: #c82333;
    color: white;
    border: none;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-indispo {
    opacity: 0.78;
    filter: grayscale(25%);
    border-color: #c82333 !important;
    position: relative;
}

.card-indispo::after {
    content: "INDISPONIBLE";
    position: absolute;
    top: 48%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-8deg);
    background: rgba(200, 35, 51, 0.95);
    color: white;
    font-size: 16px;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 8px;
    letter-spacing: 1px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.30);
    z-index: 5;
    pointer-events: none;
}

.card-indispo:hover {
    transform: none;
    box-shadow: var(--shadow-soft);
    border-color: #c82333 !important;
    cursor: default;
}

.btn-disabled {
    display: inline-block;
    background: #c82333 !important;
    color: white !important;
    font-weight: bold;
    cursor: not-allowed;
    opacity: 0.95;
    pointer-events: none;
}

/* =========================
   TEXTE
========================= */

.desc {
    font-size: 14px;
    line-height: 1.45;
    color: var(--color-muted);
}

.info {
    margin: 7px 0;
    font-size: 14px;
}

/* =========================
   BOUTONS
========================= */

.btn {
    display: inline-block;
    background: #137f8b;
    color: var(--color-white);
    padding: 9px 13px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    margin-top: 8px;
    margin-right: 6px;
    border: none;
    cursor: pointer;
    line-height: 1.25;
}

.btn:hover {
    opacity: 0.9;
}

.btn2 {
    background: #006bd6;
}

/* =========================
   FICHE DETAIL
========================= */

.fiche {
    background: var(--color-white);
    border: 2px solid var(--color-border);
    border-radius: 16px;
    padding: 22px;
    max-width: 1050px;
    box-shadow: var(--shadow-soft);
}

.fiche img {
    max-width: 420px;
    max-height: 320px;
    object-fit: contain;
    background: #f7f7f7;
    border: 1px solid #d0d0d0;
    border-radius: 12px;
    margin: 0 12px 16px 0;
    padding: 8px;
    box-sizing: border-box;
}

.fiche h2 {
    margin-top: 14px;
    line-height: 1.25;
}

/* =========================
   DESCRIPTION HTML
========================= */

.description-html {
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.55;
    color: #333;
}

.description-html * {
    max-width: 100%;
    box-sizing: border-box;
}

.description-html a {
    color: #005eb8;
    font-weight: bold;
}

.description-html a:hover {
    text-decoration: underline;
}

/* =========================
   NOTICE
========================= */

.notice {
    background: #fff3cd;
    border: 1px solid #d6a400;
    border-radius: 10px;
    padding: 14px;
    margin-top: 16px;
    line-height: 1.5;
}

/* =========================
   BANDEAU LEGAL PREMIUM
========================= */

.legal-premium {
    margin-top: 45px;
    background: linear-gradient(135deg, #ffffff, #f7f7f9);
    border-top: 3px solid var(--color-primary);
    padding: 18px 24px;
    color: #555;
    box-shadow: 0 -4px 14px rgba(0,0,0,0.05);
}

.legal-premium .legal-inner {
    max-width: 1200px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.legal-premium .legal-inner > div,
.legal-premium .legal-inner > nav {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.legal-premium strong {
    color: #222;
}

.legal-premium span {
    font-size: 12px;
}

.legal-premium .legal-links {
    border-left: 1px solid #ddd;
    padding-left: 15px;
}

.legal-premium a {
    color: #c0003f;
    text-decoration: none;
    font-weight: bold;
    margin-left: 14px;
}

.legal-premium a:hover {
    text-decoration: underline;
}

/* =========================
   RESPONSIVE
========================= */

@media screen and (max-width: 700px) {
    .container {
        padding: 18px;
    }

    .header {
        padding: 20px;
    }

    .header-inner {
        flex-direction: column;
        text-align: center;
    }

    .logo {
        height: 75px;
        max-width: 160px;
    }

    .header-center h1,
    .header h1 {
        font-size: 24px;
    }

    .header-right {
        margin-top: 10px;
    }

    .search-box {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box input,
    .search-box .btn,
    .search-box .btn2 {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }

    .categories {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .cat-btn {
        white-space: nowrap;
    }

    .card .badge {
        display: inline-block;
        padding: 4px 10px;
        border-radius: 6px;
        font-size: 11px;
        font-weight: bold;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 10px;
    }

    .card-actions {
        flex-direction: column;
    }

    .fiche {
        padding: 16px;
    }

    .fiche img {
        max-width: 100%;
        width: 100%;
        margin-right: 0;
    }

    .legal-premium .legal-inner {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .legal-premium .legal-links {
        border-left: none;
        padding-left: 0;
    }

    .legal-premium a {
        margin: 4px 6px;
    }
}

/* =========================
   GALERIE MULTI-PHOTOS
========================= */

/* Carousel */
.carousel {
    position: relative;
    margin-bottom: 10px;
    display: inline-block;
    width: 100%;
}
.carousel-inner {
    position: relative;
    width: 100%;
}
.carousel-img {
    display: none;
    width: 100%;
    border-radius: 8px;
}
.carousel-img.carousel-active {
    display: block;
}
.carousel-btn {
    position: absolute;
    top: 50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    background: rgba(0,0,0,0.45);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    z-index: 2;
    -webkit-transition: background 0.2s;
    transition: background 0.2s;
}
.carousel-btn:hover { background: rgba(0,0,0,0.7); }
.carousel-prev { left: 8px; }
.carousel-next { right: 8px; }
.carousel-dots {
    text-align: center;
    padding: 6px 0 2px;
}
.carousel-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ccc;
    margin: 0 3px;
    cursor: pointer;
    -webkit-transition: background 0.2s;
    transition: background 0.2s;
}
.carousel-dot.carousel-dot-active { background: #fa1e59; }

/* Lightbox */
#lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.88);
    z-index: 9999;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-align-items: center;
    align-items: center;
    cursor: zoom-out;
}
#lightbox-img {
    max-width: 92vw;
    max-height: 88vh;
    border-radius: 6px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    display: block;
}
#lightbox-fermer {
    position: fixed;
    top: 16px; right: 20px;
    background: rgba(255,255,255,0.15);
    color: white;
    border: none;
    border-radius: 50%;
    width: 38px; height: 38px;
    font-size: 18px;
    cursor: pointer;
    z-index: 10000;
    line-height: 1;
}
#lightbox-fermer:hover { background: rgba(255,255,255,0.3); }
