/* ================================================================
   Fleuves de vie — feuille de style partagée
   Design system : tokens, typographie, boutons, champs de formulaire
   ================================================================ */

   :root {
    /* Neutres */
    --color-bg: #F4F1EA;
    --color-surface: #FFFFFF;
    --color-surface-sunken: #EAE5D9;
    --color-text: #23282B;
    --color-text-muted: #5C6569;
    --color-border: #DED8C9;

    /* Accent principal — teinte « fleuve » */
    --primary: #1F5C63;
    --primary-hover: #163F44;
    --primary-soft: #DCEAE8;

    /* Bouton neutre / secondaire (remplace --darkGrey, non défini à l'origine) */
    --darkGrey: #4A5560;
    --darkGreyHover: #333C45;

    /* Bouton destructif */
    --danger: #9E3E2C;
    --danger-hover: #7C2F21;
    --redGradient: linear-gradient(135deg, #AE4A36, #7C2F21);

    /* Fond clair partagé (ex. page de connexion) */
    --lightGrey: #ECE7DC;

    /* Statuts de suivi (cartes, lignes du tableau, légende) */
    --status-recent-bg: #E7F0E5;
    --status-recent-fg: #3F7A48;
    --status-called-bg: #E4EDF3;
    --status-called-fg: #35678A;
    --status-urgent-bg: #F5E7E3;
    --status-urgent-fg: #9E3E2C;
    --status-quiet-bg: #ECE9E3;
    --status-quiet-fg: #5F5A52;

    /* Rayons et ombres */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 2px rgba(35, 40, 43, 0.07), 0 1px 1px rgba(35, 40, 43, 0.09);
    --shadow-md: 0 10px 28px rgba(35, 40, 43, 0.14);

    /* Typographie */
    --font-display: "Chivo", sans-serif;
    --font-body: "Rubik", sans-serif;
}

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

/* ---------------- Base ---------------- */

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.5;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--color-text);
    margin: 0 0 0.5rem;
}

h1, H2 {
    color: var(--color-text);
}

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

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

/* Effet verre — cartes flottantes, légende */
.glassEffect {
    background-color: rgba(255, 255, 255, 0.74);
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

/* ---------------- Champs de formulaire ---------------- */
input,
textarea,
select,
button {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    max-width: 90vw;
    font-family: var(--font-body);
}

input:not(.darkGrey, .blueButton, .supprimer, :disabled),
select, 
textarea {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    box-shadow: var(--shadow-sm);
}

/* Champs de saisie texte */
:not(.alertDIV) input:not(.btn, [type="checkbox"], [type="button"], [type="submit"], [type="reset"], :disabled) {
    width: 50%;
    margin-bottom: 1rem;
    height: 2.25rem;
    background-color: var(--color-surface);
}

select {
    width: 50%;
    margin-bottom: 1rem;
    background-color: var(--color-surface);
    overflow: hidden;
}

input:disabled {
    background-color: var(--color-surface-sunken);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}

input[type="submit"] {
    width: fit-content;
}

/* Case à cocher > follow */
.follow input {
    margin: 0.2rem 0 0.2rem 1rem;
    width: 1.5rem;
}

input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ---------------- Boutons ---------------- */
.darkGrey,
.blueButton,
input.supprimer,
.supprimer {
    color: white;
    border: none;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.darkGrey { background-color: var(--darkGrey); }
.darkGrey:hover { background-color: var(--darkGreyHover); }

.blueButton { background-color: var(--primary); }
.blueButton:hover { background-color: var(--primary-hover); }

input.supprimer,
.supprimer { background-image: var(--redGradient); }
input.supprimer:hover,
.supprimer:hover {
    background-image: none;
    background-color: var(--danger-hover);
}

.darkGrey:active,
.blueButton:active,
.supprimer:active {
    transform: scale(0.97);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.connect-wrapper {
    display: grid
}
/* ---------------- Mise en page générale ---------------- */
#wrapper {
    max-width: 1180px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}
.principal {
    min-height: 95vh;
    width: 100%;
    padding: 0;
    text-align: unset;
}

label {
    color: var(--color-text);
    font-size: 1rem;
    font-weight: 500;
}

.follow > label {
    font-size: unset;
}
.table-scroll {
    overflow-y: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    background-color: var(--color-surface);
}
.flexBtn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    width: fit-content;
}

table {
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

footer {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    padding: 2rem 1rem 1.5rem;
}
footer > p {
    margin: 0 !important;
}

.gridWrapper {
    gap: 2vh;
    margin: 2rem auto 0 2rem;
    display: grid;
    width: 60%;
    grid-template-rows: repeat(4, 1fr 2fr) 2fr 1fr ;
}
.gridWrapper p {
    margin: 0
}

/* HEADER */
#logo {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    height: 40px;
    width: auto;
    max-width: 40vw;
    cursor: pointer;
}
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding-bottom: 1.25rem;
}
.site-header__brand h1 {
    font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem);
    font-weight: 700;
}
.site-header__brand h1 .site-header__dash {
    color: var(--primary);
}
.site-header__brand h2 {
    font-size: clamp(1rem, 0.85rem + 0.5vw, 1.25rem);
    font-weight: 500;
    color: var(--color-text-muted);
}
.site-header #logo {
    position: static;
    top: auto;
    right: auto;
    height: 44px;
    max-width: none;
}
.wave-divider {
    display: block;
    width: 100%;
    height: 26px;
    margin-bottom: 1.75rem;
}
.wave-divider path {
    fill: none;
    stroke: var(--primary);
    stroke-width: 3;
    stroke-linecap: round;
    opacity: 0.35;
}

@media screen and (max-width: 1000px) {
    .gridWrapper .btnsDiv,
    .gridWrapper .follow {
        display: flex;
    }
    .gridWrapper .btnsDiv {
        flex-wrap: wrap;
        gap: 1rem;
    }
    .gridWrapper > input {
        min-width: 80%;
        width: fit-content;
        font-size: 1.1rem;
    }
    .gridWrapper {
        margin: 2rem 2vw;
        width: 80%;
    }
}

@media screen and (max-width: 700px) {
    :not(.alertDIV) input:not(.btn, [type="checkbox"], [type="button"], [type="submit"], [type="reset"], :disabled),
    select {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}