/* ==========================================================================
   Cabinet Dentaire Gloria — main.css
   Charge tokens + reset + declare les fonts self-hosted + utilitaires.
   --------------------------------------------------------------------------
   Ordre :
     1. @import tokens + reset
     2. @font-face Playfair Display (600, 700) + Inter (400, 500, 600, 700)
     3. Containers
     4. Typo utilities
     5. Buttons
     6. Sections + a11y utilities
   ========================================================================== */

@import url('_tokens.css');
@import url('_reset.css');

/* ==========================================================================
   Fonts self-hosted (woff2, font-display: swap)
   ========================================================================== */

@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/assets/fonts/PlayfairDisplay-SemiBold.woff2') format('woff2');
}

@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/assets/fonts/PlayfairDisplay-Bold.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/Inter-Regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/assets/fonts/Inter-Medium.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/assets/fonts/Inter-SemiBold.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/assets/fonts/Inter-Bold.woff2') format('woff2');
}

/* ==========================================================================
   Containers
   ========================================================================== */

.container,
.container-narrow,
.container-tight {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--sp-5);
    padding-right: var(--sp-5);
}

.container        { max-width: var(--container-max); }
.container-narrow { max-width: var(--container-narrow); }
.container-tight  { max-width: var(--container-tight); }

/* ==========================================================================
   Typography utilities
   ========================================================================== */

.h1 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(2rem, 4.5vw + 1rem, 4rem);   /* ~32 → 64px */
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--color-navy);
}

.h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.625rem, 2.5vw + 1rem, 2.75rem); /* ~26 → 44px */
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--color-navy);
}

.h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.25rem, 1.5vw + 0.75rem, 1.75rem); /* ~20 → 28px */
    line-height: 1.2;
    color: var(--color-navy);
}

.text-soft   { color: var(--color-text-soft); }
.text-medium { color: var(--color-text-medium); }

/* ==========================================================================
   Buttons
   --------------------------------------------------------------------------
   Base : .btn (padding, transition, font Inter SemiBold)
   Variantes : .btn--primary, .btn--outline-navy, .btn--outline-white, .btn--whatsapp
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-6);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    border: 2px solid transparent;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: background-color var(--tx-fast),
                color var(--tx-fast),
                border-color var(--tx-fast),
                transform var(--tx-fast),
                box-shadow var(--tx-fast);
    text-decoration: none;
    user-select: none;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

/* Primary : or doré */
.btn--primary {
    background: var(--color-gold);
    color: var(--color-white);
    border-color: var(--color-gold);
    box-shadow: var(--shadow-gold);
}

.btn--primary:hover {
    background: var(--color-gold-deep);
    border-color: var(--color-gold-deep);
}

/* Outline navy */
.btn--outline-navy {
    background: transparent;
    color: var(--color-navy);
    border-color: var(--color-navy);
}

.btn--outline-navy:hover {
    background: var(--color-navy);
    color: var(--color-white);
}

/* Outline blanc (sur fonds sombres) */
.btn--outline-white {
    background: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

.btn--outline-white:hover {
    background: var(--color-white);
    color: var(--color-navy);
}

/* WhatsApp */
.btn--whatsapp {
    background: var(--color-whatsapp);
    color: var(--color-white);
    border-color: var(--color-whatsapp);
}

.btn--whatsapp:hover {
    background: #1FB958;
    border-color: #1FB958;
}

/* ==========================================================================
   Layout : sections
   ========================================================================== */

section {
    padding: var(--sp-10) 0; /* 96px desktop */
}

@media (max-width: 768px) {
    section {
        padding: var(--sp-8) 0; /* 64px mobile */
    }
}

/* ==========================================================================
   Utilities a11y
   ========================================================================== */

.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;
}

/* ===== Share row (WhatsApp + Facebook + copy link) ===== */
.share-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px 0 0;
    margin-top: 24px;
    border-top: 1px solid var(--color-beige);
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}
.share-row__label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(30, 58, 95, 0.6);
    margin-right: 6px;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: transform 100ms, box-shadow 200ms, opacity 200ms;
    font-family: inherit;
}
.share-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0,0,0,0.12); }
.share-btn--whatsapp { background: #25D366; color: white; }
.share-btn--whatsapp:hover { background: #1DAA52; }
.share-btn--fb { background: #1877F2; color: white; }
.share-btn--fb:hover { background: #145FCC; }
.share-btn--copy {
    background: var(--color-white);
    color: var(--color-navy);
    border-color: var(--color-beige);
}
.share-btn--copy:hover { border-color: var(--color-gold); }
.share-btn.is-success { background: #15803D; color: white; border-color: #15803D; }

.service-share-section {
    background: var(--color-cream);
    padding: 32px 0;
}

/* ===== Cookie banner ===== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--color-navy-deep, #0F1E33);
    color: white;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    padding: 18px 0;
    animation: cookieSlideUp 400ms cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes cookieSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.cookie-banner__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.cookie-banner__text { flex: 1 1 400px; min-width: 280px; }
.cookie-banner__text strong {
    font-size: 14px;
    color: var(--color-gold, #C9A96E);
    margin-right: 8px;
}
.cookie-banner__text p {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
}
.cookie-banner__actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.cookie-banner__link {
    color: var(--color-gold, #C9A96E);
    font-size: 13px;
    text-decoration: underline;
    margin-right: 8px;
}
.cookie-banner__link:hover { color: white; }
.cookie-banner__btn {
    padding: 9px 18px;
    border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    background: transparent;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 200ms, border-color 200ms;
}
.cookie-banner__btn--ghost:hover { background: rgba(255, 255, 255, 0.1); }
.cookie-banner__btn--primary {
    background: var(--color-gold, #C9A96E);
    border-color: var(--color-gold, #C9A96E);
    color: var(--color-navy, #1E3A5F);
}
.cookie-banner__btn--primary:hover { background: #B8975D; }

.cookie-banner__reopen {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 90;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-white);
    border: 1px solid var(--color-beige, #E8DCC4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    transition: transform 200ms;
}
.cookie-banner__reopen:hover { transform: scale(1.08); }

@media (max-width: 700px) {
    .cookie-banner__inner { flex-direction: column; align-items: stretch; }
    .cookie-banner__actions { justify-content: stretch; }
    .cookie-banner__btn { flex: 1; }
}
