:root {
    --main-color: grey;
    --main-border-color: black;
    --main-bg: white;
    --footer-bg: rgb(198, 198, 198);
    --gradient-title: linear-gradient(to right, rgba(113, 106, 249, 1) 0%, rgba(91, 9, 121, 1) 100%);
    --color-nav: rgb(44, 44, 44);
    --background-primary: linear-gradient(135deg, #f8f9fc 0%, #f0f2f8 50%, #e8ebf5 100%);
    --background-secondary: #e0e7fd;
    --primary-color: #716af9;
    --primary-hover: #5247c7;
    --secondary-color: #6b7280;
    --input-color: #F8FAFC;
    --success-color: #10815c;
    --error-color: #a35454;
    --warning-color: rgb(171, 106, 106);
    --card-background: #ffffff;

    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #b3b7be;

    --border-color: #e5e7eb;
    --border-focus: #7b75e3;

    --btn-border-radius: 12px;

    --shadow-light: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-large: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 12px;
    --border-radius-small: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --btn-radius: 10px;
    --switch-width: 52px;
    --switch-height: 28px;
    --switch-radius: 999px;
    --knob-size: 22px;
    --track-off: #e4e7eb;
    --track-on: #22c55e;
    --knob: #ffffff;
    --transition-time: 180ms;
    --shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
}

* {
    resize: none;
    scroll-behavior: smooth;
    box-sizing: border-box;
}


ol,
ul {
    list-style: none;
    padding-left: 1.2rem;
}

ul li {
    position: relative;
    margin-bottom: 8px;
}

ul li::before {
    content: "•";
    position: absolute;
    top: -10px;
    left: -1.2rem;
    font-size: 1.8em;
    color: var(--primary-color);
}

p {
    cursor: default;
}

a {
    text-decoration: none;
    color: black;
}

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


/* BODY */
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background-primary);
    min-height: 100vh;

    line-height: 1.6;
    color: var(--text-primary);
}



.dyslexic-font {
    font-family:
        "OpenDyslexic",
        "Atkinson Hyperlegible",
        "Lexend",
        Arial,
        sans-serif;
}

/* /BODY */


/* Layout */
main,
.main {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow: hidden;
}

.content {
    display: flex;
    height: 100%;
    min-height: 100vh;
    width: 100%;
}

.page-content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.divider {
    margin-top: 20px;
    border-bottom: 1px solid rgb(202, 202, 202)
}

.small-flex-column {
    display: flex;
    flex-direction: column;

}

.flex-row,
.flex-col {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px
}

.flex-col {
    flex-direction: column;
    align-items: flex-start;
}



/* FORMULAIRE */
label {
    cursor: pointer;
}

.form-input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    font-size: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    outline: none;
    background: #fff;
    color: #111;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.form-group-row {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex: 1 1 100%;
    gap: 8px
}



/* HEADER */
.header-html {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    margin-bottom: 50px;
}

.header-html h1 {
    padding-left: 30px;
    margin-bottom: 8px;
    font-size: 32px;
    font-weight: 800;
    background: var(--gradient-title);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-html-subtitle {
    display: flex;
    flex-direction: row;
    padding-left: 30px;
    padding-bottom: 22px;
    gap: 6px
}

/* Message d'alert */
.message-alert {
    border-radius: 8px;
    margin: auto;
    width: 80%;
    padding: 5px 16px;
    color: black;
    font-weight: 500;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

.message-alert:empty {
    display: none
}

#input-message-alert-password {
    margin: 0;
}

#input-message-alert-password:empty {
    display: none
}

.message-alert-error {
    color: var(--error-color);
    background-color: #fbc6c6
}

.message-alert-warning {
    color: var(--warning-color);
    background-color: #ffdfdf
}

.message-alert-information {
    color: var(--primary-color);
    background-color: #ddecff
}

.message-alert-success {
    color: var(--success-color);
    background-color: #b4f4c6;
}

.message-alert-error::before,
.message-alert-warning::before,
.message-alert-information::before,
.message-alert-success::before {
    content: "";
    position: absolute;
    height: 100%;
    width: 5px;
    top: 0;
    left: 0;
}


.message-alert-error::before {
    background-color: var(--error-color)
}

.message-alert-warning::before {
    background-color: var(--warning-color);
}

.message-alert-information::before {
    background-color: var(--primary-color);
}

.message-alert-success::before {
    background-color: var(--success-color);
}





/* title */
.title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.025em;

    text-align: center;
}

.title-2 {
    font-size: 1.875rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    letter-spacing: -0.025em;

}

.subtitle {
    color: var(--text-secondary) !important;
    font-size: 0.9rem !important;
    margin: 0 !important;
    font-weight: 400 !important;
}

.a-nav {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-submit {
    background-color: var(--primary-color);
    border-radius: 10px;
    width: 80%;
    padding: 10px;
    cursor: pointer;
}


footer {
    width: 100%;
    background-color: var(--footer-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}



.form-New-User {
    border: 1px solid black;
    width: fit-content;
    padding: 15px;
    margin-bottom: 30px;
}

.form-connect {
    border: 1px solid red;
    width: fit-content;
    padding: 10px;
    margin-bottom: 30px;
}







/* ===================
COMPOSANT
====================== */

/* Boutons */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem !important;
    border: none;
    border-radius: var(--border-radius-small);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    color: white;
    box-shadow: var(--shadow-medium);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    padding: 8px 16px;
    font-weight: 500 !important;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 12px;
    border: none;
    text-align: center;
}

.btn-primary:hover {
    box-shadow: var(--shadow-large);
    background: linear-gradient(135deg, var(--primary-hover), #6d28d9);
}

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

.btn-icon {
    width: 18px;
    height: 18px;
}

.btn-delete {
    cursor: pointer;
    padding: 8px 16px;
    background-color: #DF3A3A;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    border-radius: var(--btn-border-radius);
    border: none
}

.btn-delete:hover {
    background-color: rgb(250, 94, 94);
    box-shadow: var(--shadow-large);
}

.btn-sync-calendar {
    padding: 5px 15px;
    border-radius: 19px;
    background: #4285f4;
    border: none;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s;
}

.btn-sync-calendar:hover {
    background: #2166d5;

}

.btn-google {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-color);
    padding: 5px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: white;
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius-small);
    box-shadow: var(--shadow-medium);

    cursor: pointer;
}

.btn-google:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-large);
}


/* CARDS */
.card {
    background-color: var(--card-background);
    border-radius: var(--btn-radius);
    border: 1px solid var(--border-color);
    padding: 24px;
    width: 100%;
    line-height: 20px;
}

.card-row {
    background-color: var(--card-background);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
}

.card-row:hover,
.card:hover {
    transform: translateY(-1px);
    box-shadow: rgba(19, 21, 32, 0.06) 0px 4px 16px 0px
}

.card-title {
    color: black;
    font-weight: 500;
    margin: 0;
}

/* input */
input {
    cursor: pointer;
}

.input-checkbox-switch {
    width: 40px;
    height: 20px;
}







/* input checkbox switch */
/*                       
<label class="switch" for="">
    <input type="checkbox" class="input-checkbox-switch" id=""
        name="" />
    <span class="track" aria-hidden="true" />
</label>

Conteneur clicable */
.switch {
    display: inline-block;
    line-height: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* masquer l'input natif visuellement mais laisser accessible */
.input-checkbox-switch {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* piste (track) */
.switch .track {
    display: inline-block;
    width: var(--switch-width);
    height: var(--switch-height);
    background: var(--track-off);
    border-radius: var(--switch-radius);
    position: relative;
    transition: background var(--transition-time) ease, box-shadow var(--transition-time) ease;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.03);
    vertical-align: middle;
    padding: 3px;
    box-sizing: border-box;
}

/* le bouton (knob) via pseudo-élément */
.switch .track::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 3px;
    /* position off */
    transform: translateY(-50%);
    width: var(--knob-size);
    height: var(--knob-size);
    background: var(--knob);
    border-radius: 50%;
    box-shadow: var(--shadow);
    transition: transform var(--transition-time) cubic-bezier(.2, .8, .2, 1), left var(--transition-time) ease, background var(--transition-time) ease;
    will-change: transform, left;
}

/* état checked : changer couleur et pousser le knob */
.input-checkbox-switch:checked+.track {
    background: var(--track-on);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.input-checkbox-switch:checked+.track::after {
    left: calc(100% - 3px - var(--knob-size));
    /* position on */
}

/* focus-visible pour accessibilité clavier */
.input-checkbox-switch:focus-visible+.track {
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 99, 255, 0.18);
}

/* option : petite variante */
.switch.small .track {
    --switch-width: 40px;
    --switch-height: 22px;
    --knob-size: 18px;
}

/* option : désactivé */
.input-checkbox-switch:disabled+.track {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(0.2);
}






/* progress bar */
progress {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 14px;
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid #ccc;
    border-radius: 10px;
    overflow: hidden;
}

#strength-bar::-webkit-progress-value {
    transition: 0.3s ease;
}

.strength-1::-webkit-progress-value {
    background-color: #a35454;
}

.strength-2::-webkit-progress-value {
    background-color: orange;
}

.strength-3::-webkit-progress-value {
    background-color: yellowgreen;
}

.strength-4::-webkit-progress-value {
    background-color: green;
}

/* Firefox */
.strength-1::-moz-progress-bar {
    background-color: #a35454;
}

.strength-2::-moz-progress-bar {
    background-color: orange;
}

.strength-3::-moz-progress-bar {
    background-color: yellowgreen;
}

.strength-4::-moz-progress-bar {
    background-color: green;
}