:root {
    --primary: #0b1220;
    --secondary: #111827;
    --accent: #2563eb;
    --accent-dark: #1d4ed8;
    --accent-soft: #dbeafe;
    --text: #334155;
    --muted: #64748b;
    --light: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.10);
    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.06);
    --radius: 24px;
    --radius-sm: 14px;
}

/* =========================================================
   RESET GLOBAL + ANTI DÉBORDEMENT SAFARI
========================================================= */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    min-width: 0;
}

html {
    width: 100%;
    max-width: 100%;
    height: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    min-height: 100%;
    width: 100%;
    max-width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 32%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 45%, #f1f5f9 100%);
    color: var(--text);
    line-height: 1.6;
    font-size: 14px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    -webkit-transition: all 0.25s ease;
    transition: all 0.25s ease;
}

img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

strong {
    color: var(--primary);
}

::selection {
    background: var(--accent);
    color: white;
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 24px 0;
}

.site-wrapper {
    width: 100%;
    max-width: 100%;
    min-height: 70vh;
    overflow-x: hidden;
}

/* =========================================================
   TYPOGRAPHIE SAFE
========================================================= */

p,
h1,
h2,
h3,
h4,
h5,
h6,
span,
a,
strong,
small,
li,
td,
th {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-wrap: break-word;
    word-break: normal;
}

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

.navbar {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    background: rgba(255, 255, 255, 0.86);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.04);
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.nav-container {
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin: auto;
    padding: 13px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    overflow: visible;
}

.nav-brand,
.nav-logo {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
    max-width: 100%;
}

.nav-brand img {
    width: 54px;
    height: 54px;
    min-width: 54px;
    object-fit: cover;
    border-radius: 18px;
    border: 3px solid #ffffff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}

.nav-brand strong,
.nav-logo-text strong {
    display: block;
    color: var(--primary);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
}

.nav-brand span,
.nav-logo-text small {
    display: block;
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
    margin-top: 2px;
}

.nav-logo-mark {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.25);
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    list-style: none;
    flex-wrap: wrap;
    max-width: 100%;
}

.nav-menu li {
    display: flex;
}

.nav-menu a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    padding: 10px 12px;
    border-radius: 999px;
    white-space: normal;
}

.nav-menu a:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.btn-contact {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white !important;
    padding: 10px 18px !important;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
}

.btn-contact:hover {
    background: linear-gradient(135deg, var(--accent-dark), #1e40af) !important;
    color: white !important;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    width: 45px;
    height: 45px;
    min-width: 45px;
    border-radius: 14px;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
    -webkit-appearance: none;
    appearance: none;
}

/* =========================================================
   DROPDOWN
========================================================= */

.has-dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 44px;
    left: 0;
    min-width: 230px;
    max-width: 100vw;
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 10px;
    list-style: none;
    z-index: 2000;
}

.dropdown-menu li a {
    display: block;
    padding: 11px 14px;
    border-radius: 12px;
    white-space: normal;
}

.has-dropdown:hover .dropdown-menu {
    display: block;
}

/* =========================================================
   CONTAINERS / SECTIONS
========================================================= */

.container {
    width: 100%;
    max-width: 1280px;
    margin: auto;
    padding: 72px 24px;
    overflow-x: hidden;
}

.section-title {
    margin-bottom: 34px;
    min-width: 0;
    max-width: 100%;
}

.section-title span,
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    background: rgba(37, 99, 235, 0.08);
    padding: 7px 13px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.section-title h1,
.section-title h2 {
    color: var(--primary);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.15;
    margin-top: 14px;
    letter-spacing: -0.04em;
}

.section-title p {
    color: var(--muted);
    max-width: 780px;
    margin-top: 13px;
    font-size: 15px;
}

/* =========================================================
   HERO
========================================================= */

.hero,
.main-header {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 15% 20%, rgba(37, 99, 235, 0.18), transparent 28%),
        radial-gradient(circle at 85% 15%, rgba(14, 165, 233, 0.12), transparent 30%),
        linear-gradient(135deg, #ffffff 0%, #f8fafc 60%, #eff6ff 100%);
    border-bottom: 1px solid var(--border);
}

.hero {
    padding-top: 60px;
    margin-top: 20px;
}

.hero-content {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.75fr);
    align-items: center;
    gap: 48px;
    min-height: 560px;
    overflow: hidden;
}

.hero h1 {
    font-size: clamp(38px, 5vw, 64px);
    color: var(--primary);
    line-height: 1.05;
    margin: 18px 0;
    letter-spacing: -0.06em;
}

.hero p {
    font-size: 16px;
    color: var(--muted);
    max-width: 760px;
}

.hero-actions {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-photo {
    width: 100%;
    max-width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.hero-photo::before {
    content: "";
    position: absolute;
    inset: 28px;
    max-width: 100%;
    background: linear-gradient(135deg, rgba(37,99,235,.20), rgba(14,165,233,.10));
    border-radius: 42px;
    transform: rotate(-5deg);
    z-index: 0;
}

.hero-photo img {
    position: relative;
    z-index: 1;
    width: 320px;
    max-width: 100%;
    height: 360px;
    object-fit: cover;
    border-radius: 34px;
    border: 8px solid white;
    box-shadow: var(--shadow);
}

/* =========================================================
   PROFILE HERO
========================================================= */

.profile-hero {
    width: 100%;
    max-width: 100%;
    padding: 54px 24px 72px;
    overflow-x: hidden;
}

.profile-hero-inner {
    width: 100%;
    max-width: 1280px;
    margin: auto;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 390px);
    gap: 54px;
    align-items: center;
}

.profile-hero-text {
    min-width: 0;
    max-width: 100%;
}

.profile-hero-text h1 {
    margin: 18px 0;
    color: var(--primary);
    font-size: clamp(42px, 5vw, 70px);
    line-height: 1.02;
    letter-spacing: -0.065em;
}

.profile-hero-text p {
    max-width: 760px;
    color: var(--muted);
    font-size: 16px;
}

.hero-meta {
    margin-top: 22px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-meta span {
    display: inline-flex;
    align-items: center;
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(255,255,255,0.8);
    border: 1px solid var(--border);
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

.profile-hero-visual {
    display: flex;
    justify-content: center;
    max-width: 100%;
    overflow: hidden;
}

.profile-photo-card {
    width: 340px;
    max-width: 100%;
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(226,232,240,0.95);
    border-radius: 34px;
    padding: 14px;
    box-shadow: var(--shadow);
    transform: rotate(1.2deg);
    overflow: hidden;
}

.profile-photo-card img {
    width: 100%;
    height: 390px;
    object-fit: cover;
    border-radius: 26px;
}

.profile-photo-caption {
    padding: 16px 8px 6px;
}

.profile-photo-caption strong {
    display: block;
    font-size: 15px;
}

.profile-photo-caption span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

/* =========================================================
   GRIDS
========================================================= */

.grid {
    width: 100%;
    max-width: 100%;
    display: grid;
    gap: 24px;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* =========================================================
   CARDS
========================================================= */

.card,
.item {
    max-width: 100%;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow-soft);
    min-width: 0;
    overflow: hidden;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.card:hover,
.item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: rgba(37, 99, 235, 0.25);
}

.card h2,
.card h3,
.item h3 {
    color: var(--primary);
    line-height: 1.3;
}

.card h2 {
    font-size: 23px;
    margin-bottom: 14px;
}

.card h3,
.item h3 {
    font-size: 19px;
    margin-bottom: 10px;
}

.card p,
.item p {
    color: var(--text);
    margin-bottom: 10px;
}

.item-list {
    display: grid;
    gap: 18px;
}

.item-meta {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 12px;
}

.badge {
    display: inline-flex;
    align-items: center;
    background: var(--accent-soft);
    color: var(--accent);
    padding: 7px 13px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

/* =========================================================
   BUTTONS
========================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    padding: 13px 22px;
    border-radius: 14px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
    -webkit-appearance: none;
    appearance: none;
    max-width: 100%;
    text-align: center;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
}

.btn-outline {
    background: white;
    color: var(--accent);
    border: 1px solid rgba(37, 99, 235, 0.35);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--accent-soft);
    box-shadow: none;
}

/* =========================================================
   FORMS
========================================================= */

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 800;
    margin-bottom: 7px;
    color: var(--primary);
    font-size: 13px;
}

.form-control {
    width: 100%;
    max-width: 100%;
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #ffffff;
    font-size: 14px;
    outline: none;
    transition: 0.25s ease;
    -webkit-appearance: none;
    appearance: none;
}

.form-control:focus {
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

textarea.form-control {
    min-height: 130px;
    resize: vertical;
}

button,
input,
textarea,
select {
    font: inherit;
    max-width: 100%;
}

select {
    background-color: #fff;
}

/* =========================================================
   TABLES SAFE
========================================================= */

table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
}

.table-responsive,
.admin-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* =========================================================
   GALLERY
========================================================= */

.gallery-thumb {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 15px;
    cursor: zoom-in;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.gallery-thumb:hover {
    transform: scale(1.03);
    filter: brightness(0.92);
}

.gallery-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    inset: 0;
    background: rgba(2, 6, 23, 0.88);
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.gallery-modal.active {
    display: flex;
}

.gallery-modal img {
    max-width: 92%;
    max-height: 88vh;
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.35);
}

.gallery-modal-close {
    position: absolute;
    top: 22px;
    right: 32px;
    color: white;
    font-size: 42px;
    font-weight: 300;
    cursor: pointer;
}

/* =========================================================
   FOOTER
========================================================= */

.footer {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.22), transparent 32%),
        linear-gradient(135deg, #020617 0%, #0f172a 55%, #111827 100%);
    color: white;
    margin-top: 50px;
}

.footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 42px 42px;
    opacity: 0.35;
}

.footer-container {
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin: auto;
    padding: 58px 24px;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.85fr) minmax(0, 1fr);
    gap: 42px;
}

.footer h3 {
    font-size: 24px;
    line-height: 1.25;
    margin-bottom: 12px;
}

.footer h4 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
    color: #bfdbfe;
}

.footer p,
.footer a {
    display: block;
    color: #cbd5e1;
    margin-bottom: 9px;
    font-size: 14px;
}

.footer a:hover {
    color: white;
    transform: translateX(3px);
}

.footer-bottom {
    position: relative;
    border-top: 1px solid rgba(255,255,255,0.10);
    text-align: center;
    padding: 18px 24px;
    color: #cbd5e1;
    font-size: 13px;
    background: rgba(2, 6, 23, 0.32);
}

/* =========================================================
   ADMIN
========================================================= */

.admin-main {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    padding-bottom: 40px;
}

.admin-grid-2 {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: 14px;
    min-height: 0;
    overflow-x: hidden;
}

.admin-card,
.admin-list,
.admin-list-item {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.admin-list {
    overflow-y: auto;
    padding-right: 6px;
}

.admin-list,
form.admin-card {
    scrollbar-width: thin;
    scrollbar-color: rgba(15, 23, 42, 0.22) transparent;
}

.admin-list::-webkit-scrollbar,
form.admin-card::-webkit-scrollbar {
    width: 6px;
}

.admin-list::-webkit-scrollbar-thumb,
form.admin-card::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.22);
    border-radius: 20px;
}

.admin-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 18px;
    font-size: 11.5px;
    color: #64748b;
    background: rgba(255, 255, 255, 0.92);
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.admin-footer .footer-left,
.admin-footer .footer-right {
    white-space: nowrap;
}

.admin-footer .footer-center {
    flex: 1;
    text-align: center;
    opacity: 0.8;
}

/* =========================================================
   NAVIGATEURS SANS BACKDROP FILTER
========================================================= */

@supports not ((backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px))) {
    .navbar,
    .admin-footer {
        background: #ffffff;
    }
}

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

@media (max-width: 1120px) {

    .nav-container {
        flex-wrap: wrap;
        max-width: 100%;
    }

    .nav-brand,
    .nav-logo {
        flex: 1;
        min-width: 0;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-menu {
        display: none;
        width: 100%;
        margin-top: 14px;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 8px;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(226, 232, 240, 0.9);
        border-radius: 20px;
        box-shadow: var(--shadow);
        padding: 16px;
        z-index: 9999;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li,
    .nav-menu a {
        width: 100%;
    }

    .nav-menu a {
        justify-content: flex-start;
        min-height: 44px;
        border-radius: 14px;
    }

    .dropdown-menu {
        position: static;
        display: block;
        width: 100%;
        min-width: auto;
        box-shadow: none;
        border: none;
        padding: 0 0 0 14px;
        background: transparent;
    }

    .hero-content,
    .profile-hero-inner,
    .footer-container,
    .admin-grid-2 {
        grid-template-columns: 1fr;
    }

    .grid-4,
    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-content {
        gap: 40px;
        min-height: auto;
    }

    .profile-hero-inner {
        text-align: center;
        gap: 32px;
    }

    .hero-meta,
    .hero-actions {
        justify-content: center;
    }
}

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

@media (max-width: 768px) {

    body {
        font-size: 13px;
        overflow-x: hidden;
    }

    .container {
        padding: 48px 18px;
    }

    .hero {
        margin-top: 0;
        padding-top: 38px;
    }

    .hero-content {
        padding: 40px 0;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .footer-container {
        grid-template-columns: 1fr;
    }

    .section-title h1,
    .section-title h2 {
        font-size: 30px;
        letter-spacing: -0.03em;
    }

    .hero h1,
    .profile-hero-text h1 {
        font-size: 38px;
        letter-spacing: -0.03em;
    }

    .hero-photo img {
        width: 100%;
        max-width: 300px;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .profile-hero {
        padding: 38px 18px 52px;
    }

    .profile-photo-card {
        width: 100%;
        max-width: 300px;
        margin: auto;
    }

    .profile-photo-card img {
        height: auto;
        min-height: 320px;
    }

    .card,
    .item {
        padding: 22px;
        border-radius: 18px;
    }

    .footer-container {
        gap: 26px;
    }

    .admin-footer {
        height: auto;
        min-height: 34px;
        padding: 8px 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
        font-size: 11px;
    }

    .admin-footer .footer-center,
    .admin-footer .footer-right {
        text-align: left;
    }

    .admin-main {
        padding-bottom: 82px;
    }
}

/* =========================================================
   PETITS MOBILES
========================================================= */

@media (max-width: 600px) {

    .container {
        padding: 45px 18px;
    }

    .nav-container {
        padding: 12px 16px;
        gap: 12px;
    }

    .nav-brand img {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }

    .nav-brand strong,
    .nav-logo-text strong {
        font-size: 13px;
    }

    .nav-brand span,
    .nav-logo-text small {
        font-size: 11px;
    }

    .nav-toggle {
        width: 42px;
        height: 42px;
        min-width: 42px;
        font-size: 20px;
    }

    .section-title h1,
    .section-title h2 {
        font-size: 28px;
        line-height: 1.2;
    }

    .hero h1,
    .profile-hero-text h1 {
        font-size: 31px;
        line-height: 1.12;
    }

    .hero-photo img {
        max-width: 240px;
    }

    .profile-photo-card {
        max-width: 280px;
    }

    .footer-container {
        gap: 24px;
    }
}

/* =========================================================
   SAFARI IOS
========================================================= */

@supports (-webkit-touch-callout: none) {

    body {
        min-height: -webkit-fill-available;
    }

    .navbar {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    .hero-content,
    .profile-hero-inner,
    .footer-container,
    .grid,
    .grid-2,
    .grid-3,
    .grid-4,
    .admin-grid-2 {
        min-width: 0;
    }
}
/* =========================================================
   CORRECTION MOBILE FORTE
========================================================= */

@media (max-width: 480px) {

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .navbar,
    .nav-container,
    .container,
    .hero,
    .main-header,
    .hero-content,
    .profile-hero,
    .profile-hero-inner,
    .footer,
    .footer-container,
    .grid,
    .grid-2,
    .grid-3,
    .grid-4,
    .card,
    .item {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .nav-container {
        padding: 10px 14px;
        gap: 10px;
    }

    .nav-brand,
    .nav-logo {
        flex: 1 1 auto;
        min-width: 0;
        gap: 8px;
    }

    .nav-brand img,
    .nav-logo-mark {
        width: 40px;
        height: 40px;
        min-width: 40px;
        border-radius: 13px;
    }

    .nav-brand strong,
    .nav-logo-text strong {
        font-size: 12px;
        line-height: 1.2;
    }

    .nav-brand span,
    .nav-logo-text small {
        display: none;
    }

    .nav-toggle {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 19px;
        border-radius: 13px;
    }

    .nav-menu {
        margin-top: 10px;
        padding: 12px;
        border-radius: 16px;
    }

    .nav-menu a {
        font-size: 13px;
        min-height: 42px;
        padding: 9px 12px;
    }

    .container {
        padding: 34px 14px;
    }

    .hero {
        padding-top: 28px;
        margin-top: 0;
    }

    .hero-content {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 26px;
        min-height: auto;
        padding: 24px 0;
        text-align: center;
    }

    .hero h1,
    .profile-hero-text h1 {
        font-size: 28px;
        line-height: 1.12;
        letter-spacing: -0.02em;
    }

    .hero p,
    .profile-hero-text p,
    .section-title p {
        font-size: 14px;
        line-height: 1.55;
    }

    .section-title {
        margin-bottom: 24px;
    }

    .section-title h1,
    .section-title h2 {
        font-size: 26px;
        line-height: 1.15;
    }

    .hero-actions,
    .hero-meta {
        justify-content: center;
        width: 100%;
    }

    .hero-actions .btn,
    .btn {
        width: 100%;
        max-width: 100%;
        padding: 12px 14px;
    }

    .hero-photo::before {
        inset: 18px;
        border-radius: 28px;
    }

    .hero-photo img {
        width: 100%;
        max-width: 220px;
        height: auto;
        aspect-ratio: 1 / 1;
        border-radius: 24px;
        border-width: 5px;
    }

    .profile-hero {
        padding: 30px 14px 42px;
    }

    .profile-hero-inner {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 24px;
        text-align: center;
    }

    .profile-photo-card {
        width: 100%;
        max-width: 240px;
        padding: 10px;
        border-radius: 24px;
        transform: none;
    }

    .profile-photo-card img {
        height: auto;
        min-height: 260px;
        border-radius: 18px;
    }

    .grid,
    .grid-2,
    .grid-3,
    .grid-4 {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    .card,
    .item {
        padding: 18px;
        border-radius: 16px;
    }

    .card h2 {
        font-size: 20px;
    }

    .card h3,
    .item h3 {
        font-size: 17px;
    }

    .footer {
        margin-top: 30px;
    }

    .footer-container {
        display: grid;
        grid-template-columns: 1fr !important;
        padding: 36px 16px;
        gap: 22px;
    }

    .footer h3 {
        font-size: 20px;
    }

    .footer p,
    .footer a {
        font-size: 13px;
    }

    .footer-bottom {
        padding: 14px 16px;
        font-size: 12px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .admin-footer {
        position: static;
        width: 100%;
    }

    .admin-main {
        padding-bottom: 20px;
    }
}


/* =========================================================
   FIX FINAL PROFESSIONNEL — ANTI-DÉBORDEMENT GLOBAL
   Compatible Safari / Firefox / Chrome / Opera / Mobile
   À conserver tout en bas du fichier CSS
========================================================= */

html,
body {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden !important;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    min-width: 0;
}

body,
.site-wrapper {
    overflow-x: hidden !important;
}

img,
svg,
video,
canvas,
iframe,
embed,
object {
    max-width: 100% !important;
    height: auto;
}

input,
select,
textarea,
button {
    max-width: 100%;
    font: inherit;
}

p,
span,
strong,
small,
label,
a,
td,
th,
li,
div,
.card,
.item,
.form-control {
    overflow-wrap: anywhere;
    word-break: normal;
}

/* Structures principales */
.navbar,
.nav-container,
.container,
.hero,
.main-header,
.hero-content,
.profile-hero,
.profile-hero-inner,
.profile-hero-text,
.profile-hero-visual,
.footer,
.footer-container,
.grid,
.grid-2,
.grid-3,
.grid-4,
.card,
.item,
.admin-main,
.admin-grid-2 {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.hero,
.main-header,
.profile-hero,
.footer,
.container,
.card,
.item {
    overflow-x: hidden;
}

/* Grilles stables */
.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hero-content {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, .75fr);
}

.profile-hero-inner {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 390px);
}

.footer-container {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, .85fr) minmax(0, 1fr);
}

/* Navigation sécurisée */
.nav-brand,
.nav-logo,
.nav-logo-text {
    min-width: 0;
    max-width: 100%;
}

.nav-brand strong,
.nav-logo-text strong,
.nav-brand span,
.nav-logo-text small {
    overflow-wrap: anywhere;
}

.nav-menu {
    max-width: 100%;
}

.nav-menu a {
    max-width: 100%;
    overflow-wrap: anywhere;
}

/* Boutons et formulaires */
.btn,
.form-control {
    max-width: 100%;
}

.btn {
    white-space: normal;
    text-align: center;
}

textarea.form-control {
    overflow-x: hidden;
}

/* Tableaux */
table {
    max-width: 100%;
}

.table-responsive,
.admin-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

/* Images profil / hero */
.hero-photo,
.profile-photo-card,
.profile-hero-visual {
    max-width: 100%;
    overflow: hidden;
}

.hero-photo img,
.profile-photo-card img {
    max-width: 100%;
}

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

@media (max-width: 1120px) {
    .nav-container {
        flex-wrap: wrap;
        gap: 12px;
    }

    .nav-brand,
    .nav-logo {
        flex: 1 1 auto;
        min-width: 0;
    }

    .nav-toggle {
        display: inline-flex;
        flex-shrink: 0;
    }

    .nav-menu {
        display: none;
        width: 100%;
        max-width: 100%;
        margin-top: 14px;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 8px;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(226, 232, 240, 0.9);
        border-radius: 20px;
        box-shadow: var(--shadow);
        padding: 16px;
        z-index: 9999;
        overflow: hidden;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li,
    .nav-menu a {
        width: 100%;
    }

    .nav-menu a {
        justify-content: flex-start;
        min-height: 44px;
        border-radius: 14px;
    }

    .dropdown-menu {
        position: static;
        display: block;
        width: 100%;
        min-width: auto;
        max-width: 100%;
        box-shadow: none;
        border: none;
        padding: 0 0 0 14px;
        background: transparent;
    }

    .hero-content,
    .profile-hero-inner,
    .footer-container,
    .admin-grid-2 {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .hero-content {
        gap: 40px;
        min-height: auto;
    }

    .profile-hero-inner {
        text-align: center;
        gap: 32px;
    }

    .hero-meta,
    .hero-actions {
        justify-content: center;
    }
}

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

@media (max-width: 768px) {
    body {
        font-size: 13px;
        overflow-x: hidden !important;
    }

    .container {
        padding: 48px 18px;
    }

    .hero {
        margin-top: 0;
        padding-top: 38px;
    }

    .hero-content {
        padding: 40px 0;
        text-align: center;
    }

    .grid,
    .grid-2,
    .grid-3,
    .grid-4,
    .footer-container,
    .hero-content,
    .profile-hero-inner {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .section-title h1,
    .section-title h2 {
        font-size: 30px;
        letter-spacing: -0.03em;
    }

    .hero h1,
    .profile-hero-text h1 {
        font-size: 38px;
        letter-spacing: -0.03em;
    }

    .hero-actions,
    .hero-meta {
        justify-content: center;
    }

    .hero-actions .btn,
    .btn {
        width: 100%;
    }

    .hero-photo img {
        width: 100%;
        max-width: 300px;
        height: auto;
        aspect-ratio: 1 / 1;
        margin-left: auto;
        margin-right: auto;
    }

    .profile-hero {
        padding: 38px 18px 52px;
    }

    .profile-photo-card {
        width: 100%;
        max-width: 300px;
        margin: auto;
        transform: none !important;
    }

    .profile-photo-card img {
        height: auto;
        min-height: 320px;
    }

    .card,
    .item {
        padding: 22px;
        border-radius: 18px;
    }

    .footer-container {
        gap: 26px;
    }

    .admin-footer {
        position: static;
        width: 100%;
        height: auto;
        min-height: 34px;
        padding: 8px 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
        font-size: 11px;
    }

    .admin-footer .footer-center,
    .admin-footer .footer-right {
        text-align: left;
    }

    .admin-main {
        padding-bottom: 20px;
    }
}

/* =========================================================
   PETITS MOBILES
========================================================= */

@media (max-width: 600px) {
    .container {
        padding: 38px 16px;
    }

    .nav-container {
        padding: 10px 14px;
        gap: 10px;
    }

    .nav-brand,
    .nav-logo {
        flex: 1 1 auto;
        min-width: 0;
        gap: 8px;
    }

    .nav-brand img,
    .nav-logo-mark {
        width: 40px;
        height: 40px;
        min-width: 40px;
        border-radius: 13px;
        flex-shrink: 0;
    }

    .nav-brand strong,
    .nav-logo-text strong {
        font-size: 12px;
        line-height: 1.2;
    }

    .nav-brand span,
    .nav-logo-text small {
        display: none;
    }

    .nav-toggle {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 19px;
        border-radius: 13px;
    }

    .nav-menu {
        margin-top: 10px;
        padding: 12px;
        border-radius: 16px;
    }

    .nav-menu a {
        font-size: 13px;
        min-height: 42px;
        padding: 9px 12px;
    }

    .section-title {
        margin-bottom: 24px;
    }

    .section-title h1,
    .section-title h2 {
        font-size: 26px;
        line-height: 1.15;
    }

    .hero {
        padding-top: 28px;
        margin-top: 0;
    }

    .hero-content {
        gap: 26px;
        min-height: auto;
        padding: 24px 0;
    }

    .hero h1,
    .profile-hero-text h1 {
        font-size: 28px;
        line-height: 1.12;
        letter-spacing: -0.02em;
    }

    .hero p,
    .profile-hero-text p,
    .section-title p {
        font-size: 14px;
        line-height: 1.6;
    }

    .hero-photo::before {
        inset: 18px;
        border-radius: 28px;
    }

    .hero-photo img {
        max-width: 220px;
        border-radius: 24px;
        border-width: 5px;
    }

    .profile-hero {
        padding: 30px 14px 42px;
    }

    .profile-photo-card {
        max-width: 240px;
        padding: 10px;
        border-radius: 24px;
    }

    .profile-photo-card img {
        min-height: 260px;
        border-radius: 18px;
    }

    .grid,
    .grid-2,
    .grid-3,
    .grid-4 {
        gap: 16px;
    }

    .card,
    .item {
        padding: 18px;
        border-radius: 16px;
    }

    .card h2 {
        font-size: 20px;
    }

    .card h3,
    .item h3 {
        font-size: 17px;
    }

    .footer {
        margin-top: 30px;
    }

    .footer-container {
        padding: 36px 16px;
        gap: 22px;
    }

    .footer h3 {
        font-size: 20px;
    }

    .footer p,
    .footer a {
        font-size: 13px;
    }

    .footer-bottom {
        padding: 14px 16px;
        font-size: 12px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
}

/* =========================================================
   FIX SPÉCIFIQUE SAFARI / IOS
========================================================= */

@supports (-webkit-touch-callout: none) {
    body {
        min-height: -webkit-fill-available;
    }

    .navbar,
    .hero-content,
    .profile-hero-inner,
    .footer-container,
    .grid,
    .grid-2,
    .grid-3,
    .grid-4,
    .admin-grid-2 {
        min-width: 0;
        transform: translateZ(0);
    }
}

